package com.vchello.service.project;

import java.util.List;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.vchello.bean.bind.ProjectQuery;
import com.vchello.bean.pro.InvestNote;
import com.vchello.bean.pro.Pro;
import com.vchello.bean.pro.ProFollow;
import com.vchello.bean.pro.ProLables;
import com.vchello.bean.pro.ProMilepost;
import com.vchello.bean.pro.ProOrganization;
import com.vchello.bean.pro.ProjectChange;
import com.vchello.bean.user.Invitation;
import com.vchello.bean.user.UserArea;
import com.vchello.bean.user.UserField;
import com.vchello.bean.user.UserProgress;

public interface ProjectService extends IService<Pro>{

	long allDataCount(int userId);
	
	Long allDataCounForInvestor(int userId);
	
	List<Object[]> statisProgress(List<UserProgress> progressList, int userId);
	
	List<Object[]> statisProgressV2(List<UserProgress> progressList, int userId);
	
	List<Object[]> statisOganizeProgress(int userId);
	
	Page<Pro> queryPage(Page<Pro> page, ProjectQuery query);
	
	int queryProgressSort(int userId);
	
	boolean saveOrUpdateProgress(UserProgress userProgress);
	
	UserProgress findUserProgressById(int id);
	
	Pro findProjectById(int id);

	boolean saveOrUpdateProject(Pro pro);
	
	boolean updateFollow(int[] ids, int proId);
	
	boolean updatePro(Pro pro);
	
	boolean checkPrograss(int prograssId);
	
	boolean deletePrograss(int prograssId);
	
	boolean saveOrUpdate(Pro pro);
	
	boolean saveProLabels(List<ProLables> list);
	
	boolean deleteProlabels(int projectId);
	
	boolean updateMilepost(List<ProMilepost> list);
	
	boolean updateOrganizations(List<ProOrganization> list);
	
	List<Invitation> getInvitationList(int userId, String keyWord);
	
	boolean updateFollow(List<ProFollow> follows);
	
	InvestNote saveOrUpdateNote(InvestNote investNote);
	
	boolean delNote(int id);
	
	boolean updateAreas(int[] ids, int userId, List<UserArea> dList);

	boolean updateFields(int[] ids, int userId, List<UserField> dList);
	
	List<UserArea> findUserArea(int userId);
	
	List<UserField> findUserField(int userId);
	
	boolean deleteMilepost(ProMilepost mile);
	
	ProMilepost findProMilepostById(int id);
	
	boolean deleteOrganiza(ProOrganization mile);
	
	ProOrganization findProOrganizaById(int id);
	
	boolean saveProFollow(ProFollow pf);

	boolean deleteProject(int id);
	
	List<UserProgress> userProgressesList(int userId);
	
	ProjectChange findProjectChangeByProId(int projectId);
	
	boolean saveOrUpdateProjectChange(ProjectChange projectChange);
	
	boolean deleteProjectChange(ProjectChange projectChange);
	
	List<ProjectChange> queryProjectChanges(int userId);
	
	List<Object[]> findHasProgress(int userId);
	
	int findProgressIdByForm(int userId, int fromId);
	
	boolean deleteProjectChange(List<ProjectChange> list);
	
	List<ProLables> findProLablesByProId(int proId);
	
	List<InvestNote> findInvestNoteByProId(int proId);
	
	List<ProMilepost> findProMilepostByProId(int proId);
	
	List<ProOrganization> findProOrganizationByProId(int proId);
	
	List<Object[]> findOrganizeProgress(int organizeUserId, int userId);
}
